package com.gy.springboot.entity;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

public class Bean {
    private Integer id;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date time;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("Bean [id=");
        builder.append(id);
        builder.append(", time=");
        builder.append(time);
        builder.append("]");
        return builder.toString();
    }

    public Bean(Integer id, Date time) {
        super();
        this.id = id;
        this.time = time;
    }

    public Bean() {
        super();
    }
}
